#pragma once

#include "context/PresentationContext.h"

#include "IPresentation.h"
#include "IPresentationRuntime.h"
#include "IPresentationWorkflow.h"

class AbstractPresentation : public IPresentation
{
public:
	BEGIN_DEFINE_CLASS(CLASSID_NULL)
		DEFINE_INTERFACE_ENTRY(IPresentation)
	END_DEFINE_CLASS()

public:
	AbstractPresentation(){}
	virtual ~AbstractPresentation(){};

	virtual void Present(Graphics* /*graphics*/,PresentationContext& /*context*/){}

protected:
	IPresentationRuntime* GetPresentationRuntime() const;
};

//////////////////////////////////////////////////////////////////////////
//inline methods
inline
IPresentationRuntime* AbstractPresentation::GetPresentationRuntime() const
{
	sys::ObjectPtr objPresentationRuntime;
	objPresentationRuntime.CreateObject(CLSID_PresentationRuntime);
	sys::InterfacePtr<IPresentationRuntime> pIFPresentationRuntime(objPresentationRuntime);
	return pIFPresentationRuntime;
}